package good;

/**
 * @author GaoXi
 * @date 2021/6/8 20:05
 */
public class BufferStream implements Stream {

    Stream stream;

    public BufferStream(Stream stream) {
        this.stream = stream;
    }

    @Override
    public char read(int num) {
        stream.read(num);
        //缓冲操作
        return 0;
    }

    @Override
    public void write(char c) {
        //缓冲操作
        stream.write(c);
    }
}
